home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #3
/
Commodore_Disk_User_Vol.1_3_1988_-.d64
/
elephant hunt
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
111 lines
0 rem ********************
1 rem * *
2 rem * elephant hunt *
3 rem * -------------- *
4 rem * by paul williams *
5 rem * *
6 rem * demonstration of *
7 rem * basic complier *
8 rem * *
9 rem ********************
10 deffna(x)=peek(56324)
20 poke650,255
30 fd=100
40 ne=8
50 poke53280,0:poke53281,0
100 gosub560
110 print"[147] score: you:"vv" elephants:"bb
111 ifvv+bb=0thennn=0:goto115
112 nn=vv*100/(vv+bb)
115 print" giving you a rating of:"nn"[157]%
116 [153]""
120 [153]" *** forest density: ";fd;"***"
121 [153]" *** number of elephants:";ne;"***"
122 [153]" press [return] to keep these values"
125 [133]"forest density";op:[139]op[177]0[175]op[179]700[167]fd[178]op
127 [133]"number of elephants";op:[139]op[177]0[175]op[179]100[167]ne[178]op
140 [143]
150 [153]"sysload"
151 sp[178]32:sc[178]1024:gg[178]81:uu[178]83:ft[178]40:ch[178]102:fi[178]1126:n[178]1:dq[178]54272
180 [134]e(120)
190 [129]x[178]sc[164]sc[170]39:[151]x[170]dq,5:[151]x[170]960[170]dq,5:[151]x,ch:[151]x[170]960,ch:[130]
200 [129]x[178]1064[164]1944[169]ft:[151]x[170]dq,5:[151]x[170]39[170]dq,5:[151]x,ch:[151]x[170]39,ch:[130]
210 [129]x[178]n[164]fd:i[178]sc[170][165]a(0)[172]3[170]([165]a(0)[175]191):[151]i[170]dq,5:[151]i,ch:[130]
220 [151]fi,43:[151]fi[170]dq,1
230 p[178]sc[170][181]([165]a(0)[175]15)[170]882:[151]p,uu:[151]p[170]dq,7
240 [129]x[178]n[164]ne
250 e(x)[178]sc[170][181]([165]a(0)[170][165]a(0)[170][165]a(0)[170]40)
260 [139][194](e(x))[179][177]sp[167]250
270 [130]
280 [141]330
290 en[178]en[170]n:[139]en[177]ne[167]en[178]n
300 q[178]e(en):[141]410:e(en)[178]q
310 [139]q[178]p[167]510
320 [137]280
330 p1[178]p
340 [161]t$
341 tt[178]0
342 [139]t$[178]"z"[167]tt[178]39:[137]360
343 [139]t$[178]"x"[167]tt[178]40:[137]360
344 [139]t$[178]"c"[167]tt[178]41:[137]360
345 [139]t$[178]"a"[167]tt[178][171]1:[137]360
346 [139]t$[178]"s"[167]tt[178]0:[137]360
347 [139]t$[178]"d"[167]tt[178]1:[137]360
348 [139]t$[178]"q"[167]tt[178][171]41:[137]360
349 [139]t$[178]"w"[167]tt[178][171]40:[137]360
350 [139]t$[178]"e"[167]tt[178][171]39:[137]360
351 [139]t$[178]""[167][153]"load":[128]
360 p[178]p[170]tt
370 [139][194](p)[178]43[167]540
380 [139][194](p)[179][177]sp[167]p[178]p1
390 [151]p,uu:[139]p1[179][177]p[167][151]p1,sp
400 [142]
410 q0[178]q:q1[178]q[171]sc:p1[178]p[171]sc
420 qy[178][181](q1[173]ft):py[178][181](p1[173]ft)
430 qx[178]q1[171]qy[172]ft:px[178]p1[171]py[172]ft
440 x[178][180](px[171]qx):y[178][180](py[171]qy)
450 e[178]q[170]x[170]ft[172]y:[139][194](e)[178]sp[176][194](e)[178]uu[167]490
460 e[178]q[170]x:[139][194](e)[178]sp[176][194](e)[178]uu[167]y[178]0:[137]490
470 e[178]q[170]ft[172]y:[139][194](e)[178]sp[176][194](e)[178]uu[167]x[178]0:[137]490
480 x[178]0:y[178]0
490 q[178]q[170]x[170]ft[172]y:[151]q,gg:[151]q0,sp
500 [142]
510 [129]t[178]1[164]1500:[130]
520 [153]"load";[163]15);"you lose!":bb[178]bb[170]1
530 [137]550
540 [153]"load";[163]15);"you win!":vv[178]vv[170]1
550 [151]198,0
551 [129]x[178]1[164]3000:[130]
552 [161]t$:[139]t$[179][177]""[167]110
553 [128]
560 [153]"sysload elephant hunt"
570 [153]" valvalvalvalvalvalvalvalvalvalvalvalval"
580 [153]" you have to make your way through
590 print"a jungle to your home, marked '+'.
600 [153]"however, there is one slight problem;
610 print"angry,hungry elephants like eating
620 [153]"people for tea. an elephant looks like
630 print"this: '[209]' and you look like this: '[211]'
640 [153]"trees look like this: 'spc(' , and you
650 print"cannot walk through or climb them.
660 [153]"beware-the elephants often hide in the
670 print"trees to catch you unawares!
680 [153][163]7)"press any key to continuewait
690 gett$:ift$=""then690
710 print"[147]you move using these keys:
720 [153]" q w e"
730 [153]" (NULL)(NULL)(NULL) "
740 [153]" atan(NULL)tand"
750 [153]" (NULL)(NULL)(NULL) "
760 [153]" z x c"
770 [153]"to exit from the game, press the [stop]
780 print"key during the actual game.
790 [153]" beware - the less elephants lurking
800 print"around, the faster they move !!
810 [153]"
820 print" remember - it's the elephants that
830 [153]"are hunting youwait !
840 printtab(7)"press any key to start[146]
850 [161]t$:[139]t$[178]""[167]850
870 [142]